Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / View-Related Objects Reference
View Device Functions / Manipulating View Device Object Properties


GXSetViewDeviceClip

You can use the GXSetViewDeviceClip function to set the clip property of a view device object.

void GXSetViewDeviceClip(gxViewDevice target, gxShape clip);
target
A reference to the view device whose clip you wish to set.
clip
A reference to a shape object whose geometry describes the clip to be assigned.
DESCRIPTION
The GXSetViewDeviceClip function copies information from the shape
object referenced by the clip parameter into the clip property of the view device object referenced by the target parameter. You can specify nil for the clip parameter, in which case this function sets the clip property of the target view device to a full clip. (A full clip indicates that QuickDraw GX is not to apply view device clipping to shapes that reference this view device.)

Although a filled rectangle is the most common clip shape for a view device, the new clip shape may be a geometric shape, a bitmap shape, or a glyph shape. It may not be a picture, text, or layout shape.

You only need to call this function if you want to restrict the part of the device that displays your view ports--for example, to clip out the area reserved for live video in your offscreen copy of an onscreen view device.

Because it is copied into the view device object, changing the clip shape after calling GXSetViewDeviceClip does not affect the view device's clip.

SPECIAL CONSIDERATIONS
You cannot change the clip of a view device in the onscreen view group.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
invalid_viewDevice_reference
colorProfile_must_be_nil(debugging version)
bitmap_pixel_size_must_be_1(debugging version)
empty_shape_not_allowed(debugging version)
ignorePlatformShape_not_allowed(debugging version)
nil_style_in_glyph_not_allowed(debugging version)
complex_glyph_style_not_allowed(debugging version)
illegal_type_for_shape(debugging version)
shapeFill_not_allowed(debugging version)
viewDevice_access_restricted(debugging version)
Notices (debugging version) 
clip_already_set 
tags_in_shape_ignored 
SEE ALSO
For information about geometric shapes and bitmap shapes, see Inside Macintosh: QuickDraw GX Graphics. For information about glyph shapes, see Inside
Macintosh: QuickDraw GX Typography.

To retrieve a copy of the clip property, use the GXGetViewDeviceClip function, described in the previous section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996